/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.belfalas.simy86.operadores;

import org.belfalas.simy86.Registradores;

/**
 *
 * @author belfalas
 */
public abstract class Operador {   
       
    public abstract void fetch(org.belfalas.simy86.Operador_Stat stat);
    public abstract void decode(org.belfalas.simy86.Operador_Stat stat);
    public abstract void execute(org.belfalas.simy86.Operador_Stat stat);
    public abstract void memory(org.belfalas.simy86.Operador_Stat stat);
    public abstract void writeback(org.belfalas.simy86.Operador_Stat stat);
    
    public Registradores getRA(short code){
        return Registradores.getRegistrador((short)(code >> 4));
    }
    
    public Registradores getRB(short code){
        return Registradores.getRegistrador((short)(code & 0xF));
    }
}
